package com.dtda.edu.miaosha;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchAutoConfiguration;
import org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchDataAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @author 袁强
 * @version 2019年1月28日 下午7:29:52
 * 类说明  
 */
@SpringBootApplication(exclude={ElasticsearchAutoConfiguration.class,ElasticsearchDataAutoConfiguration.class})
@MapperScan({"com.dtda.edu.miaosha.dao"})
@ComponentScan(basePackages={"com.dtda.edu.miaosha"}) 
@EnableTransactionManagement
public class GradApp extends SpringBootServletInitializer {

	/** 
     * 实现SpringBootServletInitializer可以让spring-boot项目在web容器中运行 
     */  
    @Override  
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {  
        builder.sources(this.getClass());  
        return super.configure(builder);  
    }  
    
	public static void main(String[] args) {
        SpringApplication.run(GradApp.class, args);
	}
}
